Skip to content

Comments

fix cache dynamic dimension in image-text-to-text#421

Merged
sdpython merged 6 commits intomainfrom
fixitt
Feb 23, 2026
Merged

fix cache dynamic dimension in image-text-to-text#421
sdpython merged 6 commits intomainfrom
fixitt

Conversation

@xadupre
Copy link
Collaborator

@xadupre xadupre commented Feb 23, 2026

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to address dynamic-shape handling around KV-cache tensors for the image-text-to-text task, and adds a way to override the ONNX opset used by the Qwen2.5-VL export script.

Changes:

  • Adjust dynamic shape specifications for past_key_values in image_text_to_text inputs.
  • Gate the GenerationMixin.prepare_inputs_for_generation patch by an additional transformers version upper bound and update related unit test skip logic.
  • Add an optional opset parameter to the Qwen2.5-VL export entrypoint and update the CI export unit test to pass a specific opset.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
onnx_diagnostic/torch_export_patches/patches/_patch_transformers_generation_mixin.py Adds an upper-bound version condition for when prepare_inputs_for_generation is patched.
onnx_diagnostic/tasks/image_text_to_text.py Updates dynamic-shape metadata for past_key_values (KV cache) to include a dynamic sequence/cache dimension.
onnx_diagnostic/ci_models/export_qwen25_vl.py Adds an optional opset argument and uses it to select target_opset.
_unittests/ut_torch_export_patches/test_patch_transformers.py Skips a subtest for transformers versions at/above the new boundary.
_unittests/ut_ci_models/test_ci_export.py Passes opset=24 into the Qwen2.5-VL export main() in the unit test.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sdpython sdpython merged commit 53e8b87 into main Feb 23, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants